<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="f" %> 
<!DOCTYPE html PUBLIC>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="/three/static/h-ui/css/H-ui.min.css" />
		<link rel="stylesheet" type="text/css" href="/three/static/h-ui.admin/css/H-ui.admin.css" />
		<link rel="stylesheet" type="text/css" href="/three/lib/Hui-iconfont/1.0.8/iconfont.css" />
		<link rel="stylesheet" type="text/css" href="/three/static/h-ui.admin/skin/default/skin.css" id="skin" />
		<link rel="stylesheet" type="text/css" href="/three/static/h-ui.admin/css/style.css" />
		<script type="text/javascript" src="/three/lib/jquery/1.9.1/jquery.min.js"></script>
		<script type="text/javascript" src="/three/lib/layer/2.4/layer.js"></script>
		<script type="text/javascript" src="/three/static/h-ui/js/H-ui.min.js"></script>
		<script type="text/javascript" src="/three/static/h-ui.admin/js/H-ui.admin.js"></script>
		<script type="text/javascript" src="/three/lib/My97DatePicker/4.8/WdatePicker.js"></script>
		<script type="text/javascript" src="/three/lib/datatables/1.10.0/jquery.dataTables.min.js"></script>
		<script type="text/javascript" src="/three/lib/laypage/1.2/laypage.js"></script>

<script type="text/javascript">
 $(document).ready(function(){
	 $("input[name=qx]").click(function(){
		 if(this.checked==false){
			 $("input[name=sx]").prop("checked",false);
		 }else{
			 $("input[name=sx]").prop("checked",true);
		 }
	});
	  $(':input','#form1')

	        .not(':button,:submit,:reset,:hidden')   //将myform表单中input元素type为button、submit、reset、hidden排除

	        .val('')  //将input元素的value设为空值

	        .removeAttr('checked')

	        .removeAttr('selected') // 如果任何radio/checkbox/select inputs有checked or selected 属性，将其移除 
	 
	 $('#form1').find('input[type=checkbox]').bind('click', function(){
	        $('#form1').find('input[type=checkbox]').not(this).prop("checked", false);
	    });
	  
	
	  $("#determine").click(function(){
		  var check=$("input[name=xx]:checked");//选中的复选框
		  $("#projectId").val($("input[name=xx]:checked").val());
		  check.each(function(){          
		 	 var row=$(this).parent("td").parent("tr");          
		 	 var projectname=row.find("[name='projectname']").html();//注意html()和val()          
		 	 var rmbprice=row.find("[name='rmbprice']").html();          
		 	 $("#content").val(projectname);  
		 	 $("#careprice").val(rmbprice); 
		   });  
	  });
	  $("#choose").click(function(){
		  $("input[name=sx]").prop("checked",false);
	  });
	  
	  $("#booking").click(function(){
		   $("input[name=account]").val("");
		   $("#content").val("");
		   $("input[name=price]").val("");
		   $("input[name=time]").val("");
		   $("#note").val("");
		   $("input[name=xx]").prop("checked",false);
		   $("#qname").val("");
		   $("#qtype").val("");
	  });  
	  $("#query").click(function(){
		  $("#tb").empty();
			 var qname=$("#qname").val();
			 var qtype=$("#qtype").val();
			  $.ajax({
			 	   type: "POST",
			 	   dataType:'json',
			 	   url: "/three/sms/projectList",
			 	   data: {"qname":qname,"qtype":qtype},
			 	   success: function(data){
			 	      $.each(data,function(index,obj){  
			 	    	 $("#tb").append("<tr align='center'><td>"+(index+1)+"</td><td><input type='checkbox' name='xx'></td><td name='projectname'>"+obj.project_name+"</td><td>"+obj.type_name+"</td><td name='rmbprice'>"+obj.rmb_price+"</td><td>"+obj.beauty_price+"</td>");
			 	      })
			 	   }
			 	});
		 
	  });
	  $("#querys").click(function(){
		  $("#tb1").empty();
			 var qname=$("#qnames").val();
			 var qtype=$("#qtypes").val();
			  $.ajax({
			 	   type: "POST",
			 	   dataType:'json',
			 	   url: "/three/sms/projectList",
			 	   data: {"qname":qname,"qtype":qtype},
			 	   success: function(data){
			 	      $.each(data,function(index,obj){  
			 	    	 $("#tb1").append("<tr align='center'><td>"+(index+1)+"</td><td><input type='checkbox' name='xx'></td><td name='projectname'>"+obj.project_name+"</td><td>"+obj.type_name+"</td><td>"+obj.rmb_price+"</td><td>"+obj.beauty_price+"</td>");
			 	      })
			 	   }
			 	});
		 
	  });
	 //向商家带约
	 $("#agentappointment").click(function(){
		 $("#form1").attr("action","/three/sms/saveMake");
		 $("#form1").submit();
	 });
	 
 });
 
//确定付款
function thepayment(){
	  var orderId=$("#order").val();
	  var cusername=$("#cusername").val();
	  var tobepaid=$("#tobepaid").html(); 
	  $("#form1").attr("action","/three/sms/updateDetermine?tobepaid="+tobepaid+"&orderId="+orderId);
      $("#form1").submit();
      $("#orderId").val("");
}
 //撤销
 function delData(id){
	 if(window.confirm("你确定要撤销吗？")){
		 $("#form1").attr("action","/three/sms/oUpdate?orderId="+id);
		 $("#form1").submit();
	 }
	
 }
 //开始
 function start(orderIds){
	 $("#qnames").val("");
	 $("#qtypes").val("");
	 $("input[name=sx]").prop("checked",false);
	 $.ajax({
	 	   type: "POST",
	 	   dataType:'json',
	 	   url: "/three/sms/selectId",
	 	   data: {"orderIds":orderIds},
	 	   success: function(data){
	 	      $.each(data,function(index,obj){
	 	    	 $("#korderId").html(obj.order_id);
	 	    	 if(obj.order_status==1){
	 	    		obj.order_status="已预约";
	 	    	 }else if(obj.order_status==2){
	 	    		obj.order_status="服务中";
	 	    	 }else if(obj.order_status==3){
	 	    		obj.order_status="待支付";
	 	    	 }else if(obj.order_status==4){
	 	    		obj.order_status="已支付";
	 	    	 }else if(obj.order_status==5){
	 	    		obj.order_status="已完成";
	 	    	 }else if(obj.order_status==6){
	 	    		obj.order_status="已过期";
	 	    	 }else if(obj.order_status==7){
	 	    		obj.order_status="已撤销";
	 	    	 }
	 	    	$("#status").html(obj.order_status);
	 	    	$("#mobile").html(obj.mobile);
                //实例化一个新的日期格式，使用1970 年 1 月 1 日至今的毫秒数为参数
                var subscribe_time = new Date(obj.subscribe_time);
	 	    	$("#subscribeTime").html(subscribe_time.toLocaleString());
	 	    	$("#project_name").val(obj.project_name);
	 	    	$("#deposit_money").html(obj.order_money);
	 	    	$("#project_id").val(obj.project_id);
	 	      })
	 	   }
	 	});
 }
 //确认开始
 function thestart(){
	 var project_id=$("#project_id").val();
	 var korderId=$("#korderId").html(); 
	 $("#form1").attr("action","/three/sms/changeOrders?korderId="+korderId+"&project_id="+project_id);
	 $("#form1").submit();
 }
 //详情
 function details(orderIdss){
	 $.ajax({
	 	   type: "POST",
	 	   dataType:'json',
	 	   url: "/three/sms/queryId",
	 	   data: {"orderIdss":orderIdss},
	 	   success: function(data){
	 	      $.each(data,function(index,obj){  
	 	    	 $("#customerisname").html(obj.username);
	 	    	 $("#customeraccount").html(obj.mobile);
	 	    	 $("#orderno").html(obj.order_id);
	 	    	 if(obj.order_status==1){
		 	    		obj.order_status="已预约";
		 	    		$("#timeofdeposit").html("");
		 	    	 }else if(obj.order_status==2){
		 	    		obj.order_status="服务中";
		 	    	 }else if(obj.order_status==3){
		 	    		obj.order_status="待支付";
		 	    	 }else if(obj.order_status==4){
		 	    		obj.order_status="已支付";
		 	    	 }else if(obj.order_status==5){
		 	    		obj.order_status="已完成";
		 	    	 }else if(obj.order_status==6){
		 	    		obj.order_status="已过期";
		 	    	 }else if(obj.order_status==7){
		 	    		obj.order_status="已撤销";
		 	    	 }
		 	     $("#orderstatus").html(obj.order_status);
		 	  //实例化一个新的日期格式，使用1970 年 1 月 1 日至今的毫秒数为参数
	                
	                var subscribe_time = new Date(obj.subscribe_time);

		 	     $("#appointmenttime").html(subscribe_time.toLocaleString());
		 	     $("#acceptingthedeposit").html(obj.deposit_money+"元");
		 	    if(obj.pay_way==1){
		 	    	obj.pay_way="微信";
		 	     }else if(obj.pay_way==2){
		 	    	obj.pay_way="支付宝";
		 	     }else if(obj.pay_way==3){
		 	    	obj.pay_way="美颜币";
		 	     }else if(obj.pay_way==4){
		 	    	obj.pay_way="套餐";
		 	     }
		 	     $("#paymentmethodofdeposit").html(obj.pay_way);
		 	  //实例化一个新的日期格式，使用1970 年 1 月 1 日至今的毫秒数为参数
		 	    var pay_time = new Date(obj.pay_time);
		 	     $("#timeofdeposit").html(pay_time.toLocaleString()+"(注:Invalid Date表示为空)");
		 	     $("#head").html(obj.photo);
		 	     $("#theprojectname").html(obj.project_name);
		 	     $("#caretheprice").html(obj.order_money+"元");
		 	     $("#appearance").html(obj.beauty_price+"个");
	 	      })
	 	   }
	 	});
	
	
 }
 //付款
 function paying(payno){
	 $("#order").val(payno);
	 $.ajax({
	 	   type: "POST",
	 	   dataType:'json',
	 	   url: "/three/sms/collect",
	 	   data: {"payno":payno},
	 	   success: function(data){
	 	      $.each(data,function(index,obj){
	 	    	  $("#cusername").val(obj.username);
	 	    	  $("#mphone").html(obj.mobile);
	 	    	  $("#consumption").html(obj.project_name);
	 	    	  $("#theprice").html(obj.order_money+"币");
	 	    	  if(obj.beauty_num<obj.beauty_price || obj.beauty_num==0 ){
	 	    		 alert(obj.beauty_price+"个美丽币(数量不足，请充值!!!)");
	 	    		 $("#tobepaid").html(obj.order_money);
	 	    		 $("#thepayments").prop("disabled", true);
	 	    	  }else{
	 	    		 $("#payment").modal("show");
	 	    		 $("#thepayments").prop("disabled", false);
	 	    		 $("#tobepaid").html(obj.order_money);
	 	    	  }
	 	    	 
	 	      });	    	  
          }
	});
}
 //确认修改项目
 function modifyitems(){
	  var check=$("input[name=sx]:checked");//选中的复选框 
	  $("#project_id").val($("input[name=sx]:checked").val()); 	  
	  check.each(function(){          
	 	 var row=$(this).parent("td").parent("tr");          
	 	 var projectname=row.find("[name='projectname']").html();//注意html()和val()                    
	 	 $("#project_name").val(projectname);  		 		 
	   });  
 }
 $(document).ready(function(){
		$('.table-sort').dataTable({
			"aaSorting": [[ 8, "desc" ]],//默认第几个排序
			"bStateSave": true,//状态保存
			"pading":false,
			"aoColumnDefs": [
			  //{"bVisible": false, "aTargets": [ 3 ]} //控制列的隐藏显示
			  {"orderable":false,"aTargets":[0,11]}// 不参与排序的列
			]
		});
	});
</script>
</head>
<body>
<form action="" method="post" id="form1">
<br>
<table class="table table-bg">
			<tr class="text-c">
				<td align="right">订单编号:</td>
				<td>
				<input type="text" id="orderId" name="orderId" value="${orderId }" placeholder="请输入订单编号" class="input-text"/>
				</td>
				<td align="right">顾客账号:</td>
				<td>
				<input type="text"  name="mobile" value="${mobile}" placeholder="请输入顾客账号" class="input-text"/>
				</td>
				<td align="right">顾客姓名:</td>
				<td>
				<input type="text"  name="username" value="${username}" placeholder="请输入顾客姓名" class="input-text"/>
				</td>
				<td align="right">订单状态:</td>
				<td>
				<select name="orderStatus" class="select-box">
				<option value=""></option>
				<option value="1">已预约</option>
			    <option value="2">服务中</option>
				</select>
				</td>
				<td rowspan="2">
				<button type="submit"  class="btn btn-success"><i class="Hui-iconfont">&#xe665;</i>查询</button>
				</td>
			</tr>
			<tr class="text-c">
				<td align="right">护理项目:</td>
				<td>
				<input type="text"  name="orderContent" value="${orderContent}" placeholder="请输入护理项目" class="input-text"/>
				</td>
				<td align="right">按时间分类:</td>
				<td>
				<select name="hour" class="select-box">
				 <option value="">全部</option>
				 <option value="today">今天</option>
				 <option value="tomorrow">明天</option>
				 <option value="dayafter">后天</option>
				</select>
				</td>
				
				<td align="right">预约日期:</td>
				<td>
				<input type="date" name="subscribeTime" value="${subscribeTime }" class="input-text Wdate" />
				</td>
			</tr>
		</table>
<br><br>
<a class="btn btn-primary radius" data-toggle="modal" data-target="#myModal" id="booking"><i class="Hui-iconfont">&#xe600;</i>商家代预约</a>
<!-- Modal -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" data-backdrop="static">
  <div class="modal-dialog" style="width:999px;">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
        <h4 class="modal-title" id="myModalLabel"><font style="font-weight:bold;font-style:italic;">商家代预约</font></h4>
      </div>
      <div class="modal-body">
       <table border="1" width="100%" height="490"  class="table table-hover table-bg" cellspacing="1">
       	<tr align="center" class="text-c">
       	<td align="center" width="30%">顾客账号</td>
       	<td width="50%">
       	<input type="text" name="account" style="width: 390px; height:33px;" class="input-text">
       	</td> 
       	<td align="center" width="20%" class="text-c"></td>
       	</tr>
       	<tr align="center" class="text-c">
       	<td>消费内容</td>
       	<td>
       	<input  class="input-text"  type="text"  readonly="readonly" id="content" style="width: 390px; height:33px;" name="content">
       	<input type="hidden" name="projectId" id="projectId">
       	</td>
       	<td rowspan="2">
       	<!-- Button trigger modal -->
<button type="button" class="btn btn-success" data-toggle="modal" data-target="#Modal" id="choose">
  选择项目
</button>

<!-- Modal -->
<div class="modal fade" id="Modal" tabindex="-1" role="dialog" aria-labelledby="ModalLabel" aria-hidden="true" data-backdrop="static">
  <div class="modal-dialog" style="width:666px;">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
        <h4 class="modal-title" id="ModalLabel"><font style="font-weight:bold;font-style:italic;">项目列表</font></h4>
      </div>
      <div class="modal-body">
      
      项目名称:<input type="text" name="qname" id="qname" class="input-text" style="width:160px">
      分类:<select name="qtype" style="width:160px" id="qtype" class="select-box">
      <option value=""></option>
      <c:forEach items="${tList }" var="l">
      <option value="${l.typeId }">${l.typeName }</option>
      </c:forEach>
      </select>
      <button type="button" class="btn btn-success" id="query"><i class="Hui-iconfont">&#xe665;</i>查询</button>
      <button type="reset" class="btn btn-success"><i class="Hui-iconfont">&#xe68f;</i>重置</button>
    <table border="1" width="100%" class="table table-border table-bordered table-hover table-bg">
			<tr align="center" class="text-c">
				<td width="7.5%"></td>
				<td width="4%"><input type="checkbox" disabled="disabled"/></td>
				<td width="36%">项目名称</td>
				<td width="15%">分类</td>
				<td width="20%">项目价格(元)</td>
				<td width="15%">颜值(个)</td>
			</tr>
			<tbody id="tb">
			<c:forEach items="${pList }" var="p" varStatus="c">
			<tr align="center" class="text-c">
				<td width="5%">${c.index+1 }</td>
				<td width="4%"><input type="checkbox" name="xx" value="${p.project_id }"/></td>
				<td name="projectname" width="36%">${p.project_name}</td>
				<td width="15%">${p.type_name}</td>
				<td name="rmbprice" width="20%">${p.rmb_price}</td>
				<td width="15%">${p.beauty_price}</td>
			</tr>
			</c:forEach>
			</tbody>
		</table>   
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default"  id="cancel" data-toggle="modal" data-target="#Modal">取消</button>
        <button type="button" class="btn btn-primary" id="determine" data-toggle="modal" data-target="#Modal">确定</button>
      </div>
    </div>
  </div>
</div>
       	</td>
       	</tr>
       	<tr align="center" class="text-c">
       	<td>护理价格</td>
       	<td>
       	<input type="text" name="price" style="width: 370px; height:33px;" id="careprice" class="input-text">币
       	</td>
       	</tr>
       	<tr align="center" class="text-c">
       	<td>预约时间</td>
       	<td>
       	<input type="datetime-local" name="time" style="width: 390px; height:33px;" class="input-text">
       	</td>
       	<td></td>
       	</tr>
       	<tr align="center" class="text-c">
       	<td>订单备注</td>
       	<td>
       	<textarea rows="5" cols="60" name="note" style="resize:none" id="note"></textarea>
       	</td>
       	<td></td>
       	</tr>
       	<tr align="center" class="text-c">
       	<td colspan="3">
         <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
        <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#myModal" id="agentappointment">确定</button>
       	</td>
       	</tr>
         </table>
      </div>

    </div>
  </div>
</div>
<table class="table table-border table-bordered table-hover table-bg table-sort" >
<thead>
<tr align="center" class="text-c">
		<td></td>
		<td>订单编号</td>
		<td>顾客账号</td>
		<td>顾客姓名</td>
		<td>护理项目</td>
		<td>消费类型</td>
		<td>价格(元)</td>
		<td>定金(元)</td>
		<td>预约时间</td>
		<td>店铺名称</td>
		<td>状态</td>
		<td>操作</td>
</tr>
</thead>
<tbody>
<c:forEach items="${olist}" var="o" varStatus="s">
	<tr align="center" class="text-c">
		<td>${s.index+1}</td>
		<td id="orderIds">${o.order_id}</td>
		<td>${o.mobile}</td>
		<td>${o.username}</td>
		<td>${o.project_name}</td>
		<td>
		<c:if test="${o.order_type==1}">美研币</c:if>
		<c:if test="${o.order_type==2}">礼包</c:if>
		<c:if test="${o.order_type==3}">项目</c:if>
		</td>
		<td>${o.order_money}</td>
		<td>${o.deposit_money}</td>
		<td>
		<f:formatDate value="${o.subscribe_time}" pattern="yyyy-MM-dd hh:mm:ss"/>
		</td>
		<td>${o.short_name}</td>
		<td>
		<c:if test="${o.order_status=='1'}">已预约</c:if>
		<c:if test="${o.order_status=='2'}">服务中</c:if>
		<c:if test="${o.order_status=='3'}">待支付</c:if>
		<c:if test="${o.order_status=='4'}">已支付</c:if>
		<c:if test="${o.order_status=='5'}">已完成</c:if>
		<c:if test="${o.order_status=='6'}">已过期</c:if>
		<c:if test="${o.order_status=='7'}">已撤销</c:if>
		</td>
		<td>
		<c:if test="${o.order_status=='1'}">
		<button type="button"  class="btn btn-danger"  onclick="delData('${o.order_id}')"><i class="Hui-iconfont">&#xe66b;</i>撤销</button>
		<!-- 开始，开始 -->
		<!-- Button trigger modal -->
				<button type="button" class="btn btn-info" data-toggle="modal" data-target="#mModal"  onclick="start('${o.order_id}')">
				<i class="Hui-iconfont">&#xe6df;</i>开始
				</button>
				
				<!-- 开始订单 -->
				<div class="modal fade" id="mModal" tabindex="-1" role="dialog" aria-labelledby="mModalLabel" aria-hidden="true"  data-backdrop="static">
				  <div class="modal-dialog" style="width: 999px;">
				    <div class="modal-content" >
				      <div class="modal-header">
				        <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
				        <h4 class="modal-title" id="mModalLabel" ><font face="微软雅黑">开始订单</font> </h4>
				      </div>
				      <div class="modal-body">
				         <table class="table table-border table-bordered table-hover table-bg" width="100%" bordercolor="#a0c6e5" style="border-collapse:collapse;">
							 	<tr class="text-c">
							 		<td width="30%" align="center">订单编号</td>
							 		<td colspan="2" width="40%" align="left" id="korderId"></td>
							 	</tr>
							 	<tr class="text-c">
							 		<td align="center">订单状态</td>
							 		<td colspan="2" align="left" id="status">
							 		</td>
							 	</tr>
							 	<tr class="text-c">
							 		<td align="center">顾客账号</td>
							 		<td colspan="2" align="left" id="mobile"></td>
							 	</tr>
							 	<tr>
							 		<td align="center">预约时间</td>
							 		<td colspan="2" align="left" id="subscribeTime"></td>
							 	</tr>
							 	<tr class="text-c">
							 		<td align="center">护理项目</td>
							 		<td align="left" width="25%">
							 		<input type="text" name="project_name" id="project_name" disabled="disabled" class="input-text">
							 		<input type="hidden" name="project_id" id="project_id">
							 		</td>
							 		<td width="15%" align="left">
							 		<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#updateModal">
												  修改项目
									</button>
									<!-- 修改项目开始 -->
									 <!-- Modal -->
<div class="modal fade" id="updateModal" tabindex="-1" role="dialog" aria-labelledby="updateModalLabel" aria-hidden="true" data-backdrop="static">
  <div class="modal-dialog" >
    <div class="modal-content">
      <div class="modal-header">
      <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
        <h4 class="modal-title" id="updateModalLabel"><font style="font-weight:bold;font-style:italic;">项目列表</font></h4>
      </div>
      <div class="modal-body">
      
      项目名称:<input type="text" name="qname" id="qnames" class="input-text" style="width:160px">
      分类:<select name="qtype"  id="qtypes" class="select-box" style="width:160px">
      <option value=""></option>
      <c:forEach items="${tList }" var="l">
      <option value="${l.typeId }">${l.typeName }</option>
      </c:forEach>
      </select>
      <button type="button" class="btn btn-success" id="querys"><i class="Hui-iconfont">&#xe665;</i>查询</button>
      <button type="reset" class="btn btn-success"><i class="Hui-iconfont">&#xe68f;</i>重置</button>
    <table border="1" width="100%" class="table table-border table-bordered table-hover table-bg">
			<tr align="center" class="text-c">
				<td width="7.5%"></td>
				<td width="4%"><input type="checkbox" disabled="disabled" name="qx"/></td>
				<td width="36%">项目名称</td>
				<td width="15%">分类</td>
				<td width="20%">项目价格(元)</td>
				<td width="15%">颜值(个)</td>
			</tr>
			<tbody id="tb1">
			<c:forEach items="${pList }" var="p" varStatus="c">
			<tr align="center" class="text-c">
				<td width="5%">${c.index+1 }</td>
				<td width="4%"><input type="checkbox" name="sx" value="${p.project_id }"/></td>
				<td name="projectname" width="36%">${p.project_name}</td>
				<td width="15%">${p.type_name}</td>
				<td width="20%">${p.rmb_price}</td>
				<td width="15%">${p.beauty_price}</td>
			</tr>
			</c:forEach>
			</tbody>
		</table>   
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default"  id="cancel" data-toggle="modal" data-target="#updateModal">取消</button>
        <button type="button" class="btn btn-primary" onclick="modifyitems()" data-toggle="modal" data-target="#updateModal" >确定</button>
      </div>
    </div>
  </div>
</div>
<!-- 修改项目结束 -->
							 		</td>
							 	</tr>
							 	<tr class="text-c">
							 		<td align="center">护理价格</td>
							 		<td colspan="2" align="left" id="deposit_money"></td>
							 	</tr>
							 </table>
				      </div>
				      <div class="modal-footer">
				        <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#mModal" onclick="thestart()">确认开始</button>
				      </div>
				    </div>
				  </div>
				</div>
		<!-- 开始，结束 -->
		<!-- 详情开始 -->
		<!-- Button trigger modal -->
				<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#xmyModal" onclick="details('${o.order_id}')">
				  详情
				</button>
				
				<!-- Modal -->
				<div class="modal fade" id="xmyModal" tabindex="-1" role="dialog" aria-labelledby="xmyModalLabel" aria-hidden="true"  data-backdrop="static">
				  <div class="modal-dialog" style="width: 700px;">
				    <div class="modal-content">
				      <div class="modal-header">
				        <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
				        <h4 class="modal-title" id="xmyModalLabel">订单详情</h4>
				      </div>
				      <div class="modal-body">
				        <table width="100%" class="table table-border table-bordered table-hover table-bg"  style="border-collapse:collapse;">
								<tr class="text-c">
									<td colspan="4"><font color="cornflowerblue" size="5">顾客信息</font></td>							
								</tr>
								<tr class="text-c">
									<td width="25%">顾客姓名</td>
									<td width="25%" id="customerisname"></td>
									<td width="25%">顾客账号</td>
									<td width="25%" id="customeraccount"></td>
								</tr>
								<tr class="text-c">
									<td colspan="4"><font color="cornflowerblue" size="5">订单信息</font></td>
								</tr>
								<tr class="text-c">
									<td>订单编号</td>
									<td id="orderno"></td>
									<td>订单状态</td>
									<td id="orderstatus"></td>
								</tr>
								<tr class="text-c">
									<td>预约时间</td>
									<td id="appointmenttime"></td>
									<td>预交定金</td>
									<td id="acceptingthedeposit"></td>
								</tr>
								<tr class="text-c">
									<td>定金支付方式</td>
									<td id="paymentmethodofdeposit"></td>
									<td>定金支付时间</td>
									<td id="timeofdeposit"></td>
								</tr>
								
								<tr class="text-c">
									<td colspan="4"><font color="cornflowerblue" size="5">消费内容</font></td>
								</tr>
								<tr class="text-c">
									<td rowspan="3"><img src="" alt="1" id="head"></td>
									<td>项目名称</td>
									<td colspan="2" id="theprojectname"></td>
								</tr>
								<tr class="text-c">
									<td>护理价格</td> 
									<td colspan="2" id="caretheprice"></td>
								</tr>
								<tr class="text-c">		
									<td>颜值</td>
									<td colspan="2" id="appearance"></td>
								</tr>
							</table>
				      </div>
				    </div>
				  </div>
				</div>
				<!-- 详情结束 -->
				</c:if>
				<c:if test="${o.order_status=='2'}">
				<!-- 付款开始 -->
								 <!-- Button trigger modal -->
				<button type="button" class="btn btn-info" data-toggle="modal" onclick="paying('${o.order_id}')">
				  付款
				</button>
				<input type="hidden" id="order">
				<!-- Modal -->
				<div class="modal fade" id="payment" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"  data-backdrop="static">
				  <div class="modal-dialog" style="width:777px">
				    <div class="modal-content">
				      <div class="modal-header">
				        <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
				        <h4 class="modal-title" id="myModalLabel" align="left">付款</h4>
				      </div>
				      <div class="modal-body">
				      <table class="table table-border table-bordered table-hover table-bg" width="100%"  bordercolor=" #FF69B4" style="border-collapse:collapse;">
							<tr align="center" class="text-c">
								<td width="20%">顾客姓名</td>
								<td width="30%">
								<input type="text" name="cusername" id="cusername" style="width: 190px; height: 30px;" class="input-text">
								</td>
								<td width="20%">手机号码</td>
								<td width="30%" id="mphone">
								</td>
							</tr>
							<tr class="text-c">
								<td colspan="4"><font color="forestgreen" size="4">消费记录</font></td>
							</tr>
							<tr class="text-c">
								<td>消费内容</td>
								<td colspan="3" id="consumption"></td>
							</tr>
							<tr class="text-c">
								<td>价格</td>
								<td colspan="3" id="theprice"></td>
							</tr>
							<tr class="text-c">
								<td>选择扣款方式</td>
								<td colspan="3" id="choose">美研币</td>
							</tr>
							<tr class="text-c">
								<td>待支付</td>
								<td colspan="3" id="tobepaid"></td>
							</tr>
						</table>
				       
				      </div>
				      <div class="modal-footer">
				        <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#payment" id="thepayments" onclick="thepayment()">确定付款</button>
				      </div>
				    </div>
				  </div>
				</div>
				<!-- 付款结束 -->
					<!-- 详情开始 -->
		<!-- Button trigger modal -->
				<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#xmyModal" onclick="details('${o.order_id}')">
				  详情
				</button>
				
				<!-- Modal -->
				<div class="modal fade" id="xmyModal" tabindex="-1" role="dialog" aria-labelledby="xmyModalLabel" aria-hidden="true"  data-backdrop="static">
				  <div class="modal-dialog" style="width: 700px;">
				    <div class="modal-content">
				      <div class="modal-header">
				        <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
				        <h4 class="modal-title" id="xmyModalLabel">订单详情</h4>
				      </div>
				      <div class="modal-body">
				        <table width="100%" class="table table-border table-bordered table-hover table-bg" bordercolor="#a0c6e5" style="border-collapse:collapse;">
								<tr class="text-c">
									<td colspan="4"><font color="cornflowerblue" size="5">顾客信息</font></td>							
								</tr>
								<tr class="text-c">
									<td width="25%">顾客姓名</td>
									<td width="25%" id="customerisname"></td>
									<td width="25%">顾客账号</td>
									<td width="25%" id="customeraccount"></td>
								</tr>
								<tr class="text-c">
									<td colspan="4"><font color="cornflowerblue" size="5">订单信息</font></td>
								</tr>
								<tr class="text-c">
									<td>订单编号</td>
									<td id="orderno"></td>
									<td>订单状态</td>
									<td id="orderstatus"></td>
								</tr>
								<tr class="text-c">
									<td>预约时间</td>
									<td id="appointmenttime"></td>
									<td>预交定金</td>
									<td id="acceptingthedeposit"></td>
								</tr>
								<tr class="text-c">
									<td>定金支付方式</td>
									<td id="paymentmethodofdeposit"></td>
									<td>定金支付时间</td>
									<td id="timeofdeposit"></td>
								</tr>
								
								<tr class="text-c">
									<td colspan="4"><font color="cornflowerblue" size="5">消费内容</font></td>
								</tr>
								<tr class="text-c">
									<td rowspan="3"><img src="" alt="1" id="head"></td>
									<td>项目名称</td>
									<td colspan="2" id="theprojectname"></td>
								</tr>
								<tr class="text-c">
									<td>护理价格</td> 
									<td colspan="2" id="caretheprice"></td>
								</tr>
								<tr class="text-c">		
									<td>颜值</td>
									<td colspan="2" id="appearance"></td>
								</tr>
							</table>
				      </div>
				    </div>
				  </div>
				</div>
				<!-- 详情结束 -->
				</c:if>
		</td>
	</tr>
	</c:forEach>
	</tbody>
</table>
</form>	
</body>
</html>